home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm2
/
rdate.lha
/
rdate.doc
< prev
Wrap
Text File
|
1995-10-03
|
5KB
|
111 lines
#1zz
RDATE - Set Amiga clocks from a timeserver
Rdate requires that AmiTCP be running and uses the TCP protocol to access
the "time" service on a specified machine to get the correct time. It then
converts it to your local time and sets the Amiga's software and hardware
clocks. If the hardware clock can't be found the program will print a message
and set only the software clock.
In order to perform this small miracle, the program needs to know two
things.
1. The name of the machine which will provide you with TCP time service as per
RFC868. It is important to note that the program requires the TCP service.
Some time service machines only provide the UDP service (also described in
RFC868) but the program can't use UDP.
The default name used for the machine1 is "tick" which is a machine on the
U. of S. campus (and which won't be much use to you if you are off campus. If
you have a machine in your db/hosts file whose name is tick and which provides
time service then rdate will connect to that machine. Otherwise you have to
set the environment variable TZ_TIMESERVER to the name of the server machine.
This variable must be set with the setenv command. E.G.
setenv TZ_TIMESERVER clock.domain.org
If you have a machine named "clock" in your db/hosts file then
setenv TZ_TIMESERVER clock
is sufficient.
2. You must specify which timezone you use to set your computer clock by. This
is done by setting the environment variable TZ_CHU and can be done with either
the setenv command or the Manx "set" command.
The environment variable TZ is not used because it does not allow for
timezones such as that in Newfoundland which is half an hour ahead of Atlantic
Standard Time.
The general format of the string that specifies your timezone in the
TZ_CHU environment variable is:
[-]hh[:mm][D]
This means that the time is specified as a number of hours which can be
preceded by an optional minus sign (for EAST of Greenwich) and optionally
followed by a number of minutes (e.g. 3:30 for Newfoundland) and all of this
can have an optional letter after it to specify that your timezone uses
daylight savings time. The dates of the start and end of DST are different in
various parts of the world. You indicate which is used in your zone by one
of the following letters. If you are in the northern hemisphere then you must
specify the letter in lower case, and if you are in the southern hemisphere
then you must specify it in upper case. The letters and the dates of the
start and end of DST are listed below:z
d or D: North America. Start first Sunday in April and end last Sunday in
October.
u or U: U.K. Start last Sunday in March and end last Sunday in October (the
actual dates are set by act of parliament each year but this is
usually what they pick).
e or E: Europe. Start last Sunday in March and end last Sunday in
September.
c or C: China(!). Start 12th April and end 12th September.
If you specify upper case for the southern hemisphere then the start and
end of DST are reversed. In all cases the start and end occur at 2am.
The best thing to do is to add a setenv command in your
s:startup-sequence file. If you use any of my other programs, such as the
C_BBS packet program or the CHU program, then you won't have to do anything
extra with them because they all use the same routine to check for your
timezone and adjust to UTC. I use the command:
setenv TZ_CHU 6
in my s:startup-sequence file because I am in the Central Standard Time zone
(6 hours west of Greenwich) and we do not use daylight savings time. In
Germany, which is one hour ahead of UTC and uses European daylight savings
time you would use:
setenv TZ_CHU -1e
I am not sure what DST is used in Australia or New Zealand but if as an
example, they use the same DST as the U.K. (except that they start in October
and end in March) then an upper case 'U' is specified along with the timezone
correction.
(The odd name "TZ_CHU" is derived from a program I wrote which reads the time
from Canadian radio station CHU and sets the amiga battery clock fairly
precisely).
Once you have the name of the time server and your local timezone set up
properly then all you have to do, apart from making sure that AmiTCP is
running, is to run the rdate program. It is only set up to run from the CLI.
The program prints out how many seconds the current time on the Amiga differs
from the actual time reported by the timeserver and then it sets the clock to
the correct time.c